home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Champak 140
/
(Vol 140) Sep 19 2011.iso
/
Games
/
world-wars.swf
/
scripts
/
__Packages
/
classes
/
models
/
Hex.as
next >
Wrap
Text File
|
2011-09-19
|
959b
|
47 lines
class classes.models.Hex
{
function Hex()
{
this._CORNERS = [{x:-9.5,y:-4.25},{x:0,y:-8.45},{x:9.5,y:-4.25},{x:9.5,y:4.25},{x:0,y:8.45},{x:-9.5,y:4.25}];
var _loc2_ = 0;
while(_loc2_ < this._CORNERS.length)
{
this._CORNERS[_loc2_].x *= 0.89;
this._CORNERS[_loc2_].y *= 0.89;
_loc2_ = _loc2_ + 1;
}
}
function get TL()
{
return this._CORNERS[0];
}
function get T()
{
return this._CORNERS[1];
}
function get TR()
{
return this._CORNERS[2];
}
function get BR()
{
return this._CORNERS[3];
}
function get B()
{
return this._CORNERS[4];
}
function get BL()
{
return this._CORNERS[5];
}
function get HEIGHT()
{
return this.__get__B().y - this.__get__T().y;
}
function get WIDTH()
{
return this.__get__TR().x - this.__get__TL().x;
}
}